'''
历史记录删除接口
'''
import allure
import requests
import conftest
from common.logger import Log


class Test_getRecord():

    def setup_method(self):
        # 定义登录接口URL地址
        self.batchDeleteFile_url = "http://192.168.3.182:9990/airservice-device/media/batchDeleteFile"
        #实例化日志模块
        self.log = Log("历史记录删除接口").get_logger()


    @allure.step(title="历史记录删除接口")

    def test_batchDeleteFile_case(self):

        self.batchDeleteFile_data={
                                    "fileIdList": [666]
                                }
        response = requests.post(url=self.batchDeleteFile_url, json=self.batchDeleteFile_data, headers=conftest.headers_data)

        #添加断言
        assert response.json().get("message") == "success"
        assert  response.json().get("success") == True

        #打印日志
        self.log.info("删除记录：{}".format(response.json()))


